/*
 *  ShapeWrapper.h
 *  pogostick
 *
 *  Created by daddy (chuck@kollar.com) on 9/11/09.
 *  Copyright 2009 Charles P. Kollar All rights reserved.
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#import "chipmunk.h"
#import <math.h>

#import "common.h"

// Is used to hold data gathered from a collission call back so that it can be processed
// after the callback and not during. During causes problems with chipmunk physics...
// This object is local to this class... An object must be used so that we can use a
// mutable array to hold information.
// It is also used to hold shapes in general in NSMutableArrays. These require something
// of type NSObject

@interface ShapeWrapper : NSObject {
    cpSpace *space;
	cpShape *shape;
    cpContact *contacts;
	void *data;
	int value;
    BOOL isStaticShape;
}

@property (readwrite,assign) cpSpace *space;
@property (readwrite,assign) cpShape *shape;
@property (readwrite,assign) cpContact *contacts;
@property (readwrite,assign) void *data;
@property (readwrite,assign) int value;
@property (readwrite,assign) BOOL isStaticShape;

-(id) initWithShape:(cpShape *)sh space:(cpSpace *)sp isStaticShape:(BOOL)iss;
-(id) initWithShape:(cpShape *)sh space:(cpSpace *)sp isStaticShape:(BOOL)iss contacts:(cpContact *)c;
-(id) initWithShape:(cpShape *)sh space:(cpSpace *)sp isStaticShape:(BOOL)iss contacts:(cpContact *)c data:(void *)dat;
-(id) initWithShape:(cpShape *)sh space:(cpSpace *)sp isStaticShape:(BOOL)iss contacts:(cpContact *)c data:(void *)dat value:(int)val;
-(void) cpFree;
-(void) dealloc;

@end
